package com.canopys.study.open.test.designpatterns.factory;

/**
 * @Author: Canopys
 * @Descrption:
 * @Date: Created in 23:23 2019/9/24
 * @Modified By:
 */
public class FactorySimpleStatic {

    public static Vehicle create(String type) {
        if ("bike".equals(type)) {
            return new Bike();
        } else if ("car".equals(type)) {
            return new Car();
        } else {
            return null;
        }
    }
}
